﻿using NutClass.utils;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Nut.utils
{
    class DateCookie : UtilsHelper
    {

        /// <summary>
        /// 获取当前日期，格式为"yyyy-MM-dd"
        /// </summary>
        /// <returns></returns>
        public static string GetDefaultDate()
        {
            String today = DateTime.Today.ToShortDateString();
            today = DateTime.Today.ToString("yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo);
            return today;
        }
        /// <summary>
        /// 获取当前日期，格式为"yyyyMMdd"
        /// </summary>
        /// <returns></returns>
        public static string GetDefaultShortDate()
        {
            String today = DateTime.Today.ToShortDateString();
            today = DateTime.Today.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo);
            return today;
        }
    }
}
